import { Component, OnInit, Input } from '@angular/core';


export enum MenuItemType {
  Link = 'link',
  Route = 'route',
  Callback = 'callback'
}

export interface MenuItem {
  label: string;
  type: MenuItemType;
  linkUrl?: string;
  routeUrl?: string;
  callback?: () => void;
}


@Component({
  selector: 'app-menu',
  templateUrl: './menu.component.html',
  styleUrls: ['./menu.component.less']
})
export class MenuComponent implements OnInit {
  @Input()
  menuData: MenuItem[] = [];
  constructor() {

  }

  ngOnInit() {

    console.log(this.menuData);
  }

}
